package com.lee.example.controller;

import com.lee.example.entity.User;
import com.lee.example.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lichujun
 * @date 2019/4/22 11:04
 */
@RestController
public class UserController {

    @Resource
    private UserService userService;

    @RequestMapping("/findUserByName")
    public List<User> findUserByName(String name) {
        return userService.findUserByName(name);
    }

    @RequestMapping("/test")
    public String test() {
        return "hello";
    }

}
